<!-- template inhertance -->
<extend name="layout/default"/>

<!-- styles -->
<block name="linkcss">
    <link rel="stylesheet" href="/Public/home/css/supplier/compensation.css">
</block>

<!-- scripts -->
<block name="linkjs">
    <script src="/Public/home/js/supplier/compensation.js"></script>
</block>

<!-- page title -->
<block name="webtitle">
    <title>创建供应商赔偿处罚通知单</title>
</block>

<!-- navagations -->
<block name="breadcrumb">
    <ol class="breadcrumb breadcrumb-edit">
        <li><a href="/">供应商管理</a></li>
        <li class="active">创建供应商赔偿处罚通知单</li>
    </ol>
</block>

<!-- main body -->
<block name="content">
    <form action="" class="layui-form">
        <div class="layui-form-item">
            <label class="layui-form-label">供应商名称</label>
            <div class="layui-input-block">
                <select name="supplierName" id="supplierName" lay-filter="supplierName" lay-verify="required">
                    <option value=""></option>
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">供应商代码</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input supplierCode" name="supplierCode" lay-verify="required" placeholder="供应商代码" readonly>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">供应商类别</label>
            <div class="layui-input-block">
                <select name="supplierType" id="supplierType" lay-verify="required">
                    <option value=""></option>
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">赔偿类别</label>
            <div class="layui-input-block">
                <select name="compensationType" id="compensationType" lay-verify="required">
                    <option value=""></option>
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">赔偿原因描述</label>
            <div class="layui-input-block">
                <textarea name="compensationCause" class="layui-textarea" placeholder="请输入赔偿的具体原因描述"></textarea>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">处罚项目</label>
            <div class="layui-input-block">
                <select name="penaltyItem" id="penaltyItem" lay-verify="required" lay-filter="penaltyItem">
                    <option value=""></option>
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">处罚描述</label>
            <div class="layui-input-block">
                <textarea name="penaltyDescription" class="layui-textarea penaltyDescription" placeholder="请输入处罚的具体描述"></textarea>
            </div>
        </div>

        <!--处罚项目选择赔款才出现该选项-->
        <div class="pay">
            <div class="layui-form-item">
                <label class="layui-form-label">赔付实施时间</label>
                <div class="layui-input-block">
                    <select name="penaltyTime" id="penaltyTime" lay-verify="required">
                        <option value=""></option>
                    </select>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">赔付支付方式</label>
                <div class="layui-input-block">
                    <select name="penaltyWay" id="penaltyWay" lay-verify="required">
                        <option value=""></option>
                    </select>
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button type="button" class="layui-btn" lay-submit lay-filter="review">发起评审</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>

    <!--编写选择框模板-->
    <script type="text/html" id="select">
        <option value=""></option>
        {{#  layui.each(d, function(index, item){ }}
             <option value="{{item.value}}">{{item.name}}</option>
        {{#   }); }}
        {{#   if(d.length === 0){ }}
              无数据
        {{#   } }}
    </script>
</block>